package com.aliliwu.db_test.services;

import javax.jdo.PersistenceManager;

import com.aliliwu.db_test.entities.User_info_entity;
import com.aliliwu.db_test.utils.PMF;

public class User_info_service {
	
	  public static String insertNew(
				long u_id,
                String name,
				long sex,
				String birthday,			
				String tinyurl,				
				String headurl,
				String mainurl) {
		  
		  User_info_entity entry = new User_info_entity();
		  
		  entry.setBirthday(birthday);
		  entry.setHeadurl(headurl);
		  entry.setMainurl(mainurl);
		  entry.setName(name);
		  entry.setSex(sex);
		  entry.setTinyurl(tinyurl);
		  entry.setU_id(u_id);
		  
		  PersistenceManager pm = PMF.get().getPersistenceManager();
		  pm.makePersistent(entry);
		  
		  return entry.getName();
	  }
			 
     


}
